/**
 * Language class
 *
 * @author Joshua Gross
 * @update Benjamin Hutchins
 *    - Added to popup
 *    - Added lingo-replacement
 * @update G. Henson
 *    - big simplification of the whole thing
 **/
var Languages = {
   current: '',                      // current language being used
   dictionnary: {},


   /**
    * Adds a language to Language.dictionary
    *
    * @arguments
    *   language - the name of the language
    *   dict - the language dictionary
    *
    * @author Joshua Gross
    **/
   onLoad: function(language, dict) {
      Languages.dictionary = dict;
      Languages.set(language);
   },
   
   /**
    * Goes through and changes any items with the class lang-TEXT,
    * where TEXT is the language dictionary key, to the actual text.
    *
    * @arguments
    *   language - the language to use
    *
    * @author Joshua Gross
    **/
   set: function(language) {
      Languages.current = language;
   },
   
   /**
    * Get the text to show for a language
    **/
   get: function(text) {
      //alert (text);
      return Languages.dictionary[text];
   }

};
